package com.stylefeng.guns.modular.product.service.impl;

import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult;
import com.stylefeng.guns.core.util.ExcelUtil;
import com.stylefeng.guns.modular.product.model.*;
import com.stylefeng.guns.modular.product.dao.ProductFxMapper;
import com.stylefeng.guns.modular.product.service.*;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.stylefeng.guns.modular.system.model.User;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author stylefeng123
 * @since 2019-03-15
 */
@Service
@Transactional
public class ProductFxServiceImpl extends ServiceImpl<ProductFxMapper, ProductFx> implements IProductFxService {

    @Override
    public List<Map<String, Object>> selectProductFX(String customer, String entryDate, String tradeDate) {
        return this.baseMapper.selectProductFX(customer, entryDate, tradeDate);
    }

    @Override
    public int setPositionStatus(Integer productFxId, String status) {
        return this.baseMapper.setPositionStatus(productFxId, status);
    }

    @Override
    public List<Map<String, Object>> getFxReportByCustomer(String customer) {
        return this.baseMapper.getFxReportByCustomer(customer);
    }

    @Override
    public List<Map<String, Object>> getFxTotalReportByCustomer(String customer) {
        return this.baseMapper.getFxTotalReportByCustomer(customer);
    }

    @Override
    public List<Map<String, Object>> getOptionReportByCustomer(String customer) {
        return this.baseMapper.getOptionReportByCustomer(customer);
    }


}
